﻿
-- =============================================
-- Author:		<赵洪涛>
-- Create date: <2012-08-16>
-- Description:	<删除尚未经过审核的客户>
-- =============================================
CREATE PROCEDURE [dbo].[proc_CustomerNoAudit_Delete]
(
	@CompanyId varchar(10),
	@CusId varchar(1000)
)
AS
BEGIN
	Declare @cSql varchar(2000)
--	Set @cSql = 'Update Customer Set AuditPerson = Null Where CustomerId in(''' + @CusId + ''') And Audit=0 And CompanyId=' + @CompanyId
	Set @cSql = 'Delete From Customer Where CustomerId in(''' + @CusId + ''') And Audit=0 And CompanyId=' + @CompanyId
	Execute(@cSql)
END